<div class="admin-form">
  <%= error_messages_for 'user' %>
  <fieldset>
    <legend>Enter user details</legend>
    
    <% form_for :user do |form| %>
      <p>
        <label for="user_email">E-mail:</label>
        <%= form.text_field :email, :size => 40 %>
      </p>

      <p>
        <label for="user_password">Password:</label>
        <%= form.password_field :password, :size => 40 %>
      </p>

      <p>
        <label for="user_name">Name:</label>
        <%= form.text_field :name, :size => 40 %>
      </p>

      <p>
        <label for="user_address">Address:</label>
        <%= form.text_area :address, :cols => 40, :rows => 3 %>
      </p>

      <p>
        <label for="user_phone">Telephone:</label>
        <%= form.text_field :phone, :size => 10 %>
      </p>

      <p>
        <label for="user_birthdate">Date of birth:</label>
        <%= form.date_select :birthdate, :order => [:day, :month, :year],
          :start_year => 1907, :end_year => Date.today.year%>
      </p>

      <p>
        <label for="user_sex">Sex:</label>
        <%= form.radio_button :sex, "F" %> Female
        <%= form.radio_button :sex, "M" %> Male
      </p>

      <p>
        <label for="user_experience">Experience:</label>
        <%= form.text_area :experience, :cols => 40, :rows => 4%>
      </p>

      <p>
        <label for="user_superadmin">Make super-admin?</label>
        <%= form.check_box :superadmin%>
      </p>

      <%= submit_tag "Add user" %>
    <% end %>
  </fieldset>
</div>
